#!/bin/bash

# 开发环境一键启动脚本

echo "🚀 启动开发环境..."

# 切换到开发环境配置
./env.sh dev

echo ""
echo "🐳 启动Docker容器..."

# 启动开发环境 (使用覆盖配置)
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d --build

echo ""
echo "✅ 开发环境启动完成！"
echo ""
echo "🌐 访问地址:"
echo "  前端 (热重载): http://localhost:3000"
echo "  后端 API: http://localhost:8000/api/"
echo "  Django Admin: http://localhost:8000/admin/"
echo "  API文档: http://localhost:8000/api/docs/"
echo ""
echo "📋 常用命令:"
echo "  查看日志: docker-compose -f docker-compose.yml -f docker-compose.dev.yml logs -f"
echo "  停止服务: docker-compose -f docker-compose.yml -f docker-compose.dev.yml down"
echo "  重启后端: docker-compose -f docker-compose.yml -f docker-compose.dev.yml restart backend"
